import request from "../../utils/request";

export function getSpectatorList() {
    return request.get({
        url: `/spectator`,
    });
}

export function addSpectator(data) {
    return request.post({
        url: `/spectator`,
        data: data
    });
}

export function removeSpectator(id) {
    return request.delete({
        url: `/spectator/${id}`,
    })
}

export function getSpectatorInfo(id) {
    return request.get({
        url: `/spectator/info/${id}`,
    })
}

export function updateSpectator(data) {
    return request.put({
        url: `/spectator`,
        data: data
    })
}